package com.wiloon.java8x.mocking;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by Roy on 2016/2/25;
 */


public class SingletonInnerClass {
    private static Logger logger = LoggerFactory.getLogger(SingletonInnerClass.class);

    private SingletonInnerClass() {
    }

    private static class SingletonHolder {
        private static final SingletonInnerClass INSTANCE = new SingletonInnerClass();
    }

    public static SingletonInnerClass getInstance() {
        return SingletonHolder.INSTANCE;
    }

    public String getFoo() {
        logger.debug("get foo invoked");
        return "bar";
    }
}